<table summary="">
	<caption></caption>
		<tr>
    	<th scope="row">Sender</th>
    <td><%= creator_link(invitation) %></td>
  </tr>
  <tr>
    <th scope="row">Invitation token</th>
    <td><%= invitation.token %></td>
  </tr>
  <tr>
    <th scope="row">Copy link</th>
    <td><% unless invitation.redeemed_at %><%= link_to "copy and use", new_user_path(:invitation_token => invitation.token) %><% end %></td>
  </tr>
  <tr>
    <th scope="row">Sent to</th>
    <% if invitation.redeemed_at %>
    <td><%= invitation.invitee_email %></td>
    <% else %>
    <td>
      <%= form_for(invitation) do |f| %>
        <p><label for="invitee_email">Enter an email address:</label> <%= f.text_field :invitee_email %></p>
        <p><%= hidden_field_tag :user_id, @user.try(:login) %></p>
        <p class="submit"><%= f.submit %></p>
      <% end %>
    </td>
    <% end %>
  </tr>
  <tr>
    <th scope="row">Redeemed by</th>
    <td><%= invitee_link(invitation) %></td>
  </tr>
  <tr>
    <th scope="row">Created at</th>
    <td><%= invitation.created_at %></td>
  </tr>
  <tr>
    <th scope="row">Sent at</th>
    <td><%= invitation.sent_at %></td>
  </tr>
  <tr>
    <th scope="row">Redeemed at</th>
    <td><%= invitation.redeemed_at %></td>
  </tr>
</table>
